#ifndef LAYER_HH
#define LAYER_HH

#include "Parameters.h"
#include "Vector3.h"

#include <QString>

class Layer
{
protected:

  //Properties of the material
  double ms;           //Magnetization (A/m)
  double alpha;	       //damping Coefficient
  double k;	       //Anisotropy constant J/m3
  double angleAni;     //Angle between anisotropy axis and z axis
  double angleAni2;    //Phi angle in XY plane (0=x axis)

  //Physical properties of the layer
  double polarization;	//Spin polarization factor
  double asymetry;	//Asymetry coeff
  double thickness;     //thickness (m)
  double surface;	//Surface of the layer (m2)
  Vector3 nd;           //Demagnetization vector
  Vector3 nr;           //Mutual demagnetization vector
  double upExchange;       //Exchange constant in J/m with upper layer
  double downExchange;     //Exchange constant with downward layer

  QString name;     // Layer Name
  int number;           //number of the layer

 

  Vector3 m,sm;         //magnetization,switched magnetization
  bool frozen;          //Freezes magnetization
	
public:
 
  Layer();

  virtual ~Layer();
  Layer choice(int);
  Layer copy(Layer layer);

  double getMs();
  Vector3 getMag();
  Vector3 getSwitchedMag();
  Vector3 getND();
  Vector3 getNR();
  double getK();
  double getAngleAni();
  double getAngleAni2();
  double getAlpha();
  double getThickness();
  double getSurface();
  bool getFrozen();
  int getNumber();
  double getUpExchange();
  double getDownExchange();
  double getPolarization();

  void setMag(Vector3 vector);
  void setMag(double mx,double my,double mz);
  void setSwitchedMag(Vector3 vector);
};


#endif






